import {Component, OnInit} from '@angular/core';
import {ControlUIWidget, SFCustomWidgetSchema} from '@delon/form';


@Component({
    selector: 'locate-map-alain',
    templateUrl: './locate-map-alain.component.html',
    styleUrls: ['./locate-map-alain.component.less']
})
export class LocateMapAlainComponent extends ControlUIWidget<SFCustomWidgetSchema> implements OnInit {
    /* 用于注册小部件 KEY 值 */
    static readonly KEY = 'locate-map-alain';

    selectedValue: any;

    ngOnInit(): void {
    }

    reset(_value: any): void {
        this.selectedValue = _value;
    }


    setValue(value: string): void {
        super.setValue(value);
        if (this.ui.valueChange) {
            this.ui.valueChange(value);
        }
    }

    ngModelChange(value: string) {
        this.setValue(value);
    }
}
